package com.leedsoft.common;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

/**
 * Created by leeds on 2017/7/1.
 */
public class JSON {
    public static final Gson gson = new Gson();

    public static <T> T fromJson(String json) {
        return gson.fromJson(json, new TypeToken<T>(){}.getType());
    }
}
